package dao.banco;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DaoConexao {

	private static final String URL = "jdbc:postgresql://localhost:5432/agenda";
	private static final String usuario = "postgres";
	private static final String senha = "neguimas";

	public Connection conectar() throws SQLException {
		try {
			return DriverManager.getConnection(URL, usuario, senha);
		} catch (SQLException se) {
			throw new SQLException("Erro ao conectar o Banco de Dados : "
					+ se.getMessage());
		}
	}
}
